


<template>
  <div class="app-container preWorkBox">
    <div class="logoutDiv">
      <div class="subDiv">
        <el-button
          v-for="(item) in subProcessList"
          :key="item.processId"
          :type="statusfun(curProProcess.processId,item)"
        >{{ item.processName }}</el-button>
      </div>
      <el-dropdown class="avatar-container right-menu-item hover-effect" trigger="click">
        <div class="avatar-wrapper">
          <!-- <img :src="avatar" class="user-avatar" /> -->
          <i class="el-icon-more" style="font-size: 28px;" />
        </div>
        <el-dropdown-menu slot="dropdown">
          <el-dropdown-item  @click.native="logout">
            <span>退出登录</span>
          </el-dropdown-item>
        </el-dropdown-menu>
      </el-dropdown>
    </div>
    <!-- 上料防错 -->
    <!-- <StepsItem></StepsItem> -->
    <div class="content">
      <div class="btnDiv">
        <el-button
          :type="this.btnIndex == '1' ? 'primary' :'info'"
          @click="btnChange('1')"
          style="font-size: 24px;"
        >版本关连</el-button>
        <!-- <el-button :type="this.btnIndex == '2' ? 'primary' :'info'" @click="btnChange('2')" style="font-size: 24px;">扫码装箱</el-button> -->
      </div>
      <Version v-if="this.btnIndex== '1'"></Version>
      <!-- <Abnormal v-if="this.btnIndex== '2'"></Abnormal> -->
    </div>
  </div>
</template>
      
  <script>
import StepsItem from "../components/stepsItem.vue";
import Version from "../components/version.vue";
import Abnormal from "../components/abnormal.vue";
import SopShow from "../components/sopShow.vue";
import { mapGetters } from "vuex";
export default {
  name: "keyBingding",
  components: { StepsItem, Version, Abnormal, SopShow },
  data() {
    return {
      btnIndex: "1",
      loading: false
    };
  },
  watch: {},
  computed: {
    ...mapGetters(["sidebar", "avatar", "device"])
  },
  created() {},
  methods: {
    statusfun(index) {
      return "process";
    },
    submitForm() {},
    reset() {
      this.form = {
        resource: undefined,
        resource1: undefined,
        resource2: undefined,
        resource3: undefined
      };
      // this.autoGenFlag = false;
      this.resetForm("form");
    },
    btnChange(type) {
      this.btnIndex = type;
    },
    async logout() {
      this.$confirm("确定注销并退出系统吗？", "提示", {
        confirmButtonText: "确定",
        cancelButtonText: "取消",
        type: "warning"
      })
        .then(() => {
          this.$store.dispatch("LogOut").then(() => {
            location.href = "/index";
          });
        })
        .catch(() => {});
    },
  }
};
</script>
      
  <style rel="stylesheet/scss" lang="scss" scoped>
.preWorkBox ::v-deep .el-icon-check::before {
  // display: none !important;
  content: "";
}

.perForm ::v-deep .el-form-item__label {
  font-size: 28px;
}

.perForm ::v-deep .el-radio__label {
  font-size: 18px;
}

.content {
  margin-top: 20px;
  // text-align: center;
  display: flex;
  justify-content: center;
  width: 85vw;
  .btnDiv {
    position: absolute;
    z-index: 11;
    right: 20px;
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    justify-content: center;

    button {
      margin: 15px 0;
    }
  }
}

.dialog_footer {
  width: 100%;
  text-align: center;
  margin-top: 20px;
  // display: flex;
  // justify-content: center;
}
.sn_box {
  text-align: left;
  margin-left: 10%;
  font-size: 20px;
  line-height: 40px;
}
.logoutDiv{
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
}
.subDiv {
  margin-bottom: 15px;
  button {
    margin: 0 10px;
    font-size: 18px;
  }
}
</style>
      